package com.ruoyi.service.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.service.mapper.CheServiceMapper;
import com.ruoyi.service.domain.CheService;
import com.ruoyi.service.service.ICheServiceService;

/**
 * 服务项目Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-02
 */
@Service
public class CheServiceServiceImpl implements ICheServiceService 
{
    @Autowired
    private CheServiceMapper cheServiceMapper;

    /**
     * 查询服务项目
     * 
     * @param id 服务项目主键
     * @return 服务项目
     */
    @Override
    public CheService selectCheServiceById(Long id)
    {
        return cheServiceMapper.selectCheServiceById(id);
    }
// 根据商户id查询服务列表
    @Override
    public List<CheService> selectCheServiceListByShopId(Long shop_id) {
        return cheServiceMapper.selectCheServiceListByShopId(shop_id);
    }
    /**
     * 查询服务项目列表
     * 
     * @param cheService 服务项目
     * @return 服务项目
     */
    @Override
    public List<CheService> selectCheServiceList(CheService cheService)
    {
        return cheServiceMapper.selectCheServiceList(cheService);
    }

    /**
     * 新增服务项目
     * 
     * @param cheService 服务项目
     * @return 结果
     */
    @Override
    public int insertCheService(CheService cheService)
    {
        cheService.setCreateTime(DateUtils.getNowDate());
        return cheServiceMapper.insertCheService(cheService);
    }

    /**
     * 修改服务项目
     * 
     * @param cheService 服务项目
     * @return 结果
     */
    @Override
    public int updateCheService(CheService cheService)
    {
        return cheServiceMapper.updateCheService(cheService);
    }

    /**
     * 批量删除服务项目
     * 
     * @param ids 需要删除的服务项目主键
     * @return 结果
     */
    @Override
    public int deleteCheServiceByIds(Long[] ids)
    {
        return cheServiceMapper.deleteCheServiceByIds(ids);
    }

    /**
     * 删除服务项目信息
     * 
     * @param id 服务项目主键
     * @return 结果
     */
    @Override
    public int deleteCheServiceById(Long id)
    {
        return cheServiceMapper.deleteCheServiceById(id);
    }
}
